<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head th:replace="nav :: navHeaderIFrameItem(~{::title})">
    <title>雪花明细</title>
</head>
<body>
    <div id="form_win">
        <form class="layui-form" lay-filter="formData" >
            <div class="layui-form-item">
                <label class="layui-form-label">业务类型</label>
                <div class="layui-input-block">
                    <input type="text" name="bizType"  placeholder="业务类型" autocomplete="off" class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">起始值</label>
                <div class="layui-input-block">
                    <input type="text" name="beginId" placeholder="起始值" autocomplete="off" class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">步长</label>
                <div class="layui-input-block">
                    <input type="text" name="step" placeholder="步长" autocomplete="off" class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">是否初始化</label>
                <div class="layui-input-block">
                    <input type="radio" name="isNeedInit" value="是" title="是" disabled>
                    <input type="radio" name="isNeedInit" value="否" title="否" disabled>
                </div>
            </div>
        </form>
    </div>
    <div th:include="nav::navFooterIFrameItem" ></div>
    <script>
        //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
        layui.use(['form'], function() {
            //引入layui from模块
            let form = layui.form
            ,$ = layui.$;

            // $.ajax({
            //     type: "post",
            //     url: "/layui/formSubmit",
            //     data:{},
            //     dataType:"json",
            //     success:function(result){
                    let data= {
                        "bizType": "1",
                        "beginId": "123456",
                        "step": "1",
                        "isNeedInit": "否"
                    }
                    // if(result.code===200){

                $("input[name='isNeedInit'][value="+data.isNeedInit+"]").removeAttr("disabled");
                // $("input[name='isNeedInit'][value='否']").next().removeClass('layui-radio-disbaled layui-disabled');

                        form.val('formData',data);
                    // }else{
                    //     layer.msg("错误码为200");
                    // }
            //     },
            //     error : function(e){
            //         layer.msg('服务异常');
            //     }
            // });

        })
    </script>
</body>
</html>